<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>PetShop</title>
</head>
<body>
<div class="left-section">
    <h1>PetShop</h1>
    <p>PetShop</p>
    <p>PetShop</p>
</div>

<div class="right-section">
    <div class="login-container">
        <div class="login-header">
            <h2>用户登录</h2>
        </div>

        <div class="login-tabs">
            <div class="tab active">手机号密码登录</div>
        </div>

        <form class="login-form" action="login.user" method="post">
            <div class="form-group">
                <label for="phone">手机号</label>
                <input type="text" id="phone" name="phone" required minlength="11" maxlength="11" placeholder="请输入手机号！">
            </div>

            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" required minlength="6" maxlength="15" placeholder="请输入密码！">
            </div>

            <div class="form-group">
                <label for="captcha">验证码</label>
                <div class="captcha-container">
                    <input type="text" id="captcha" name="captcha" required placeholder="请输入验证码！">
                    <img src="captcha" class="captcha-img" title="点击刷新验证码" onclick="this.src='captcha?t='+new Date().getTime()">
                </div>
            </div>

            <button type="submit" class="login-button">登录</button>
        </form>

        <div class="create-account">
            还没有账号？<a href="register.jsp">创建账号</a>
        </div>
    </div>
</div>
</body>
<style>
    body {
        font-family: 'Arial', sans-serif;
        height: 100vh;
        margin: 0;
        color: #333;
        display: flex;
        background-image: url('static/Background.png');
        background-size:100% 100%;
        background-attachment: fixed;
        overflow-x: hidden;
    }

    .left-section {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .right-section {
        flex: 1;
        position: relative;
    }

    .login-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        color: #fff;
        width: 300px;
        border-radius: 16px;
        padding: 20px 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }

    .login-header h2 {
        text-align: center;
        margin-bottom: 12px;
        font-size: 18px;
        color: #333;
    }

    .login-tabs {
        display: flex;
        justify-content: space-around;
        margin-bottom: 15px;
    }

    .login-tabs .tab {
        padding: 6px 10px;
        font-size: 13px;
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
        color: #555;
    }

    .login-tabs .tab.active {
        border-color: #3498db;
        font-weight: bold;
        color: #3498db;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 4px;
        display: block;
    }

    .form-group input {
        width: 100%;
        box-sizing: border-box;
        background: rgba(255,255,255,0.3);
        border: none;
        padding: 10px;
        border-radius: 12px;
        color: #000;
        font-size: 14px;
        box-shadow: 0 0 4px rgba(0,0,0,0.1);
    }

    .captcha-container {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .captcha-img {
        height: 32px;
        cursor: pointer;
        border: 1px solid #ccc;
        border-radius: 5px;
    }

    .login-button {
        width: 100%;
        font-size: 14px;
        border: none;
        cursor: pointer;
        background: linear-gradient(to right, #3498db, #5dade2);
        color: #fff;
        padding: 10px;
        border-radius: 24px;
        font-weight: bold;
        transition: all 0.3s ease;
    }

    .login-button:hover {
        background-color: #2980b9;
    }

    .create-account {
        text-align: center;
        margin-top: 10px;
        font-size: 13px;
    }

    .create-account a {
        color: #3498db;
        text-decoration: none;
    }

    .create-account a:hover {
        text-decoration: underline;
    }
</style>
</html>